<template>
  <div class="c-section">
    <div class="c-section-header">
      <div v-show="title" class="c-section-title">
        {{ title }}
        <slot name="title" />
      </div>
      <div>
        <slot name="right" />
      </div>
    </div>
    <div>
      <slot />
    </div>
  </div>
</template>
<script>
export default {
  name: 'CSection',
  props: {
    title: {
      type: String,
      default: ''
    }
  }
}
</script>
<style lang="scss" scoped>
.c-section{
  .c-section-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 10px 0;
    .c-section-title{
      font-weight: bold;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      font-size: 14px;
      $bgc:linear-gradient(90deg,rgba(54,204,192,1) 0%,rgba(84,221,184,1) 100%);
      &::before{
        content: '';
        display: inline-block;
        width: 3px;
        height: 25px;
        background: $bgc;
        margin-right: 10px;
        border-radius: 3px;
      }
    }
  }
}
</style>
